// const path = require("path");

// const { WebpackManifestPlugin } = require("webpack-manifest-plugin");
// new WebpackManifestPlugin()
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
// new BundleAnalyzerPlugin()

module.exports = require('webpack-merge').merge(require('./webpack.common'), {
  output: {
    clean: true,
  },
  mode: 'production', // development production

  module: {
    rules: [
      {
        test: /\.css$/,
        use: ['style-loader', 'css-loader'],
      },
      {
        test: /\.less$/,
        use: [
          'style-loader',
          { loader: 'css-loader', options: { modules: { localIdentName: '[name]--[hash:base64:5]' } } },
          {
            loader: 'less-loader',
            options: {
              lessOptions: {
                javascriptEnabled: true,
              },
            },
          },
        ],
      },
    ],
  },

  plugins: [],
});
